package TestClasses;

import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ModelLayer.*;
import DBLayer.*;

public class DBEmployeeTest {
	
	DBEmployee dbe = new DBEmployee();

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testGetAllEmployees() {
		ArrayList<Employee> emp = dbe.getAllEmployees(false);
	    System.out.println(emp.size());
	}

	@Test
	public void testFindEmployee() {
		Employee emp = dbe.findEmployee(1);
		System.out.println(emp.getName());
	}

	@Test
	public void testSearchEmployeeName() {
		Employee emp = dbe.searchEmployeeName("Nicholas");
		System.out.println(emp.getName() + " " + emp.getAddress());
	}

	@Test
	public void testSearchEmpId() {
		Employee emp = dbe.searchEmpId(3);
		System.out.println(emp.getName() + " " + emp.getAddress());
	}

/*	@Test
	public void testInsertEmployee() throws Exception {
		Employee empObj = new Employee(7, "Christian Hosbond", "Onsild Byvej 4", "DK-6000", "Kolding", 8000, "hosbond", "123456");
		dbe.insertEmployee(empObj);
	}*/

/*	@Test
	public void testUpdateEmployee() {
		Employee empObj = new Employee(4, "Christian Bond", "Onsild Byvej 4", "DK-6000", "Kolding", 8000, "hosbond", "123456");
		dbe.updateEmployee(empObj);
	}*/

/*	@Test
	public void testDeleteEmployee() {
		dbe.deleteEmployee(4);
		ArrayList<Employee> emps = dbe.getAllEmployees(false);
		System.out.println(emps.size());
	}*/

}
